<markdown>
# 前后缓冲

`buffer-size` 设置缓冲个数
</markdown>

<template>
  <x-virtual-list :items="data" virtual :buffer-size="5" style="height: 256px">
    <template #default="{ item, index }">
      <span style="padding: 12px">{{ item.name }}</span>
    </template>
  </x-virtual-list>
</template>

<script setup>
const data = [...Array(500)].map((_, i) => ({
  name: 'item ' + i
}))
</script>
